package com.sunday.boot3.user.center.rest.api;

import com.sunday.boot3.user.center.rest.vo.permissions.*;
import com.sunday.common.core.remoting.rest.page.PageVO;
import com.sunday.common.core.remoting.rest.response.RestResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Collection;

/**
 * @Description: 权限表 Web 层
 * @author: zsy
 * @Create: 2024/09/23 10:06:39
 */
@Tag(name = "权限表")
public interface PermissionsApi {

    /**
     * 访问路径
     */
    String ACCESS_PATH = "/permissions";

    /**
     * @Description: 新增 权限表 数据
     * @Param: [savePermissionsReqVO]
     * @Return: com.sunday.common.core.remoting.rest.response.RestResponse
     * @author: zsy
     * @Create: 2024/09/23 10:06:39
     */
    @Operation(summary = "新增", description = "新增 权限表 数据")
    @PostMapping("/save")
    RestResponse save(@Parameter(description = "新增 权限表VO", in = ParameterIn.DEFAULT) @RequestBody SavePermissionsReqVO savePermissionsReqVO);

    /**
     * @param saveBatchPermissionsReqVO
     * @return
     * @Description: 权限表 批量权限保存
     */
    @Operation(summary = "批量保存权限", description = "权限表 批量权限保存")
    @PostMapping("/saveBatch")
    RestResponse saveBatch(@Parameter(description = "批量保存 权限VO", in = ParameterIn.DEFAULT) @RequestBody SaveBatchPermissionsReqVO saveBatchPermissionsReqVO);

    /**
     * @Description: 删除 权限表 数据
     * @Param: [removePermissionsReqVO]
     * @Return: com.sunday.common.core.remoting.rest.response.RestResponse
     * @author: zsy
     * @Create: 2024/09/23 10:06:39
     */
    @Operation(summary = "删除", description = "删除 权限表 数据")
    @DeleteMapping("/remove")
    RestResponse remove(@Parameter(description = "删除 权限表VO", in = ParameterIn.DEFAULT) @RequestBody RemovePermissionsReqVO removePermissionsReqVO);

    /**
     * @Description: 修改 权限表 数据
     * @Param: [updatePermissionsReqVO]
     * @Return: com.sunday.common.core.remoting.rest.response.RestResponse
     * @author: zsy
     * @Create: 2024/09/23 10:06:39
     */
    @Operation(summary = "修改", description = "修改 权限表 数据")
    @PutMapping("/update")
    RestResponse update(@Parameter(description = "修改 权限表VO", in = ParameterIn.DEFAULT) @RequestBody UpdatePermissionsReqVO updatePermissionsReqVO);

    /**
     * @Description: 获取 权限表 分页列表数据
     * @Param: [pagePermissionsReqVO]
     * @Return: com.sunday.common.core.remoting.rest.response.RestResponse<com.sunday.common.core.remoting.rest.page.fegin.FeginPageResultVO < com.sunday.boot3.user.center.rest.vo.permissions.PagePermissionsResVO>>
     * @author: zsy
     * @Create: 2024/09/23 10:06:39
     */
    @Operation(summary = "列表数据", description = "获取 权限表 分页列表数据")
    @PostMapping("/page")
    RestResponse<PageVO<PagePermissionsResVO>> page(@Parameter(description = "权限表VO", in = ParameterIn.DEFAULT) @RequestBody PagePermissionsReqVO pagePermissionsReqVO);

    /**
     * 全量获取 权限标数据
     *
     * @param
     * @return {@link RestResponse< Collection< ListPermissionsResVO>>}
     */
    @Operation(summary = "全量数据获取", description = "获取 权限表 全量数据")
    @PostMapping("/list")
    RestResponse<Collection<ListPermissionsResVO>> list();
}